package com.yanqu.road.server.cmd.activity.sonhai.cross;

import com.yanqu.road.dao.impl.activity.fund.UserActivityFundDataDaoImpl;
import com.yanqu.road.entity.activity.UserActivityConditionData;
import com.yanqu.road.entity.activity.args.ActivityValueParamArgs;
import com.yanqu.road.entity.activity.fund.UserActivityFundData;
import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.logic.bussiness.player.UserActivityBussiness;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.SonHaiProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.CmdApi;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.fund.ActivityFundModule;
import com.yanqu.road.server.manger.activity.fund.ActivityFundMgr;
import com.yanqu.road.server.protocol.Protocol;

import java.math.BigInteger;
import java.util.List;

@CmdApi(reqMsg = SonHaiProto.SonHaiTeamScoreChangeFromCrossMsg.class, respMsg = SonHaiProto.SonHaiTeamScoreChangeFromCrossMsg.class)
@Cmd(code = Protocol.S_SON_HAI_TEAM_SCORE_CHANGE_FROM_CROSS,desc = "山海伏兽-队伍积分变更-跨服返回")
public class SonHaiTeamScoreChangeFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        SonHaiProto.SonHaiTeamScoreChangeFromCrossMsg reqMsg = SonHaiProto.SonHaiTeamScoreChangeFromCrossMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();
        long teamScore = reqMsg.getTeamScore();
        //战令进度变更
        if (player != null) {
            player.getModule(ActivityFundModule.class).updateProgress(activityId, teamScore);
        }
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
